home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20030409-20031118
/
000308_nugulus@netscape.net_Fri Sep 26 12:10:04 EDT 2003.msg
< prev
next >
Wrap
Text File
|
2020-01-01
|
3KB
|
59 lines
Article: 14552 of comp.protocols.kermit.misc
Path: newsmaster.cc.columbia.edu!phl-feed.news.verio.net!nntp1.tagonline.com!nycmny1-snf1.gtei.net!news.gtei.net!newsfeed.albacom.net!kleenex.wirehub.nl!news.completel.fr!ircam.fr!usenet-fr.net!teaser.fr!deine.net!news-out1.nntp.be!propagator2-sterling!news-in-sterling.nuthinbutnews.com!newshosting.com!news-xfer1.atl.newshosting.com!diablo.voicenet.com!prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr11.news.prodigy.com.POSTED!not-for-mail
From: Jun Zhang <nugulus@netscape.net>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: comp.protocols.kermit.misc
Subject: Re: How to use fopen
References: <NFXcb.181$vB7.165756109@newssvr11.news.prodigy.com> <bl1hjq$s8o$1@sesame.cc.columbia.edu>
In-Reply-To: <bl1hjq$s8o$1@sesame.cc.columbia.edu>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 35
Message-ID: <S%Ycb.191$tx1.173384842@newssvr11.news.prodigy.com>
NNTP-Posting-Host: 159.66.144.147
X-Complaints-To: abuse@prodigy.net
X-Trace: newssvr11.news.prodigy.com 1064590450 ST000 159.66.144.147 (Fri, 26 Sep 2003 11:34:10 EDT)
NNTP-Posting-Date: Fri, 26 Sep 2003 11:34:10 EDT
Organization: SBC http://yahoo.sbc.com
X-UserInfo1: OXZYS]SGYJSUCFD[LZKJOPHAWB\^PBQLGPQRJWQHBATBTSUBYFWEAE[YJLYPIWKHTFCMZKVMB^[Z^DOBRVVMOSPFHNSYXVDIE@X\BUC@GTSX@DL^GKFFHQCCE\G[JJBMYDYIJCZM@AY]GNGPJD]YNNW\GSX^GSCKHA[]@CCB\[@LATPD\L@J\\PF]VR[QPJN
Date: Fri, 26 Sep 2003 15:34:10 GMT
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14552
fopen /read \%c inputfile
fread \%c a
so that each element of the array will be a field of a line in
inputfile. Suppose a line in the inputfile is like,
5122785633 root rootpass
I'll have a[2] with the value 'rootpass'.
Please correct me.
Jun
Frank da Cruz wrote:
> In article <NFXcb.181$vB7.165756109@newssvr11.news.prodigy.com>,
> Jun Zhang <nugulus@netscape.net> wrote:
> : What I have in mind is to say,
> : fopen /read \%c inputfile arrayname
> : and then start to access the array elements by,
> : fread ...
> : How can I exactly do this?
> : (I was told the manual is shipped, and take 1 to 2 weeks to deliver.)
> :
> You have to be more specific. Do you want each line of the file to
> be assigned to an array element? Then:
>
> fread /line \%c \&a[\%i]
>
> or whatever. You don't have to wait for the manual to read about arrays
> and file i/o. See:
>
> http://www.columbia.edu/kermit/ckermit70.html#x7.10 (about arrays)
> http://www.columbia.edu/kermit/ckermit70.html#x1.22 (about file i/o)
>
> - Frank